﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.Security;

namespace ProjectSem40701.Admin
{
    public partial class UserRoundManage : System.Web.UI.Page
    {
        //su kien xay ra khi page load
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.DropDownList1.DataBind();
            }
        }

        //su kien xay ra khi DropDownList1 duoc thay doi selectedindex
        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            BindRound();
        }
        //su kien xay ra khi DropDownList1 duoc do day du lieu vao
        protected void DropDownList1_DataBound(object sender, EventArgs e)
        {
            BindRound();
        }
        //bind du lieu vao cac vong thi theo examID
        private void BindRound()
        {
            //this.DropDownList2.DataBind();
            //this.DropDownList3.DataBind();
        }

        protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                this.grvUserRoundManage.DataBind();
                //this.DropDownList2.DataBind();   
            }
            catch
            { 
                
            }

        }
        //su kien xay ra khi du lieu duoc do day DropDownList2
        protected void DropDownList2_DataBound(object sender, EventArgs e)
        {
            //this.grvUserRoundManage.DataBind();
        }

        protected void Label1_DataBinding(object sender, EventArgs e)
        {
            Label lblStatus = (Label)sender;
            if (lblStatus.Text == "1")
            {
                lblStatus.Text = "Out";
            }
            else
            {
                lblStatus.Text = "Finish";
            }
        }
        
    }
}
